﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Adapter
{
    class Stack:IStack
    {
        List<object> list;
        public Stack()
        {
            list = new List<object>();
        }

        public object Pop()
        {
            object obj=list[list.Count-1];
            list.RemoveAt(list.Count-1);
            return obj;
        }

        public void Push(object obj)
        {
            list.Add(obj);
        }

        public object Peek()
        {
            return list[list.Count - 1];
        }
    }
}
